{% extends "layout.html" %}
 
{% block content %}
  <h2>Sign up</h2>
  
  {%for message in form.username.errors%}
    <div class ="flash">{{message}}</div>
   {% endfor %} 
  {% for message in form.firstname.errors %}
    <div class="flash">{{ message }}</div>
  {% endfor %}
   
  {% for message in form.lastname.errors %}
    <div class="flash">{{ message }}</div>
  {% endfor %}
   
  {% for message in form.email.errors %}
    <div class="flash">{{ message }}</div>
  {% endfor %}
   
  {% for message in form.password.errors %}
    <div class="flash">{{ message }}</div>
  {% endfor %}
   
  <form action="{{ url_for('signup') }}" method=post>
    {{ form.hidden_tag() }}
    </br>
    {{ form.username.label }}
    {{ form.username }}
    </br>
    {{ form.firstname.label }}
    {{ form.firstname }}
    </br>
     
    {{ form.lastname.label }}
    {{ form.lastname }}
   </br>
    {{ form.email.label }}
    {{ form.email }}
    </br> 
    {{ form.password.label }}
    {{ form.password }}
    </br>
    {{ form.confirm.label }}
    {{ form.confirm }}
    </br> 
    {{ form.submit }}
  </form>
     
{% endblock %}
